<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<script>


function makaleYukle()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("myDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/makaleYukle.action",true);
	xmlhttp.send(null);
}

function makaleAra()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("myDiv").innerHTML=xmlhttp.responseText;   
 	}
	
	alert("Bize Her Yer Trabzon");
	alert("1461 Trabzon");
	alert("1461 Trabzon 2 - gs 1");
	alert("ona gore");
	xmlhttp.open("GET","http://localhost:8080/yazgellab/makaleAra.action",true);
	xmlhttp.send(null);
}


function yayiniDondur()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("myDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/yayiniDondur.action",true);
	xmlhttp.send(null);
}

function rolIstek()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("myDiv").innerHTML=xmlhttp.responseText;   
 	}
	
	xmlhttp.open("GET","http://localhost:8080/yazgellab/rolIstek.action",true);
	xmlhttp.send(null);
}

function makaleSil()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("myDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/makaleSil.action",true);
	xmlhttp.send(null);
}

function buton2()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/buton2.action",true);
xmlhttp.send(null);
}

function profilSil()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/profilSil.action",true);
xmlhttp.send(null);
}

function dergiEklemeBasvurusu()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/dergiEklemeBasvurusu.action",true);
xmlhttp.send(null);
}


function dergiYetkiAl()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/dergiYetkiAl.action",true);
xmlhttp.send(null);
}


function uyeIstekleriIncele()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/uyeIstekleriIncele.action",true);
xmlhttp.send(null);
}

function uyeSil()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/uyeSil.action",true);
xmlhttp.send(null);
}

function dergiSil()
{
var xmlhttp;

if (window.XMLHttpRequest) 
xmlhttp=new XMLHttpRequest(); 

else 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");


xmlhttp.onreadystatechange=function()
{ 
if (xmlhttp.readyState==4 && xmlhttp.status==200) 
document.getElementById("myDiv").innerHTML=xmlhttp.responseText; 
}

xmlhttp.open("GET","http://localhost:8080/yazgellab/dergiSil.action",true);
xmlhttp.send(null);
}

function profilDuzenle(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("profilDuzenleDiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/profilduzenle.action",true);
	xmlhttp.send(null);
}
function yorumGonder(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("yorumGonderDiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/yorumgonder.action",true);
	xmlhttp.send(null);
}

function hakemeMakaleGonder(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("hakemeMakaleGonderDiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/hakememakalegonder.action",true);
	xmlhttp.send(null);
}

function uyeKararVer(karar){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("uyeKararDiv").innerHTML=xmlhttp.responseText;
		}
	}

	if(karar==1){
		xmlhttp.open("GET","http://localhost:8080/yazgellab/uyekararver.action?karar=1",true);
	}
	else{
		xmlhttp.open("GET","http://localhost:8080/yazgellab/uyekararver.action?karar=0",true);
	}
	xmlhttp.send(null);
}

function dergiKararVer(karar){
	
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("dergiKararDiv").innerHTML=xmlhttp.responseText;
		}
	}

	if(karar==1){
		xmlhttp.open("GET","http://localhost:8080/yazgellab/dergikararver.action?karar=1",true);
	}
	else{
		xmlhttp.open("GET","http://localhost:8080/yazgellab/dergikararver.action?karar=0",true);
	}
	xmlhttp.send(null);
}

function makaleDuzenle(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("gdiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/makaleduzenle.action",true);
	xmlhttp.send(null);
}

function yazardanDuzeltmeIste(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("gdiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/yazardanduzeltmeiste.action",true);
	xmlhttp.send(null);
}

function rolSil(){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("gdiv").innerHTML=xmlhttp.responseText;
		}
	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/rolsil.action",true);
	xmlhttp.send(null);
}

function makaleKararVer(karar){
	var xmlhttp;
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function(){
		//document.getElementById("myDiv").innerHTML=xmlhttp.status;
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
			document.getElementById("makaleKararVerdiv").innerHTML=xmlhttp.responseText;
		}
	}

	if(karar==0){
		xmlhttp.open("GET","http://localhost:8080/yazgellab/makalekararver.action?karar=0",true);
	}
	else if (karar==1){
		xmlhttp.open("GET","http://localhost:8080/yazgellab/makalekararver.action?karar=1",true);
	}
	else{
		xmlhttp.open("GET","http://localhost:8080/yazgellab/makalekararver.action?karar=2",true);
	}
	xmlhttp.send(null);
}
	
/* YILMAZ  */
function rolBasvurusuYap()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("yilmazDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/rolBasvuru.action",true);
	xmlhttp.send(null);
}

function takipListesiGuncelle()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("yilmazDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/takipListesiGuncelle.action",true);
	xmlhttp.send(null);
}

function makaleKararVerr()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("yilmazDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/makaleKarari.action",true);
	xmlhttp.send(null);
}

function dergiOlustur()
{
	var xmlhttp;
	
	if (window.XMLHttpRequest)  	
 		 xmlhttp=new XMLHttpRequest(); 	 
  
	else  	
  		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  	
  
	xmlhttp.onreadystatechange=function()
	{  
  		if (xmlhttp.readyState==4 && xmlhttp.status==200)   	
    	document.getElementById("yilmazDiv").innerHTML=xmlhttp.responseText;   
 	}

	xmlhttp.open("GET","http://localhost:8080/yazgellab/dergiOlustur.action",true);
	xmlhttp.send(null);
}

</script>
</head>
<body>
	<div id="myDiv"><h2>volkan</h2></div>
	<button type="button" onclick="makaleYukle()">Makaleyi Yukle</button>
	<button type="button" onclick="makaleAra()">Makale Ara</button>
	<button type="button" onclick="yayiniDondur()">Dergi Yayini Dondur</button>
	<button type="button" onclick="rolIstek()">Rol Istek Karar Ver</button>
	<button type="button" onclick="makaleSil()">Makale Sil</button>
	<button type="button" onclick="buton2()">buton 2</button>
	<button type="button" onclick="profilSil()">Profil Sil</button>
	<button type="button" onclick="dergiEklemeBasvurusu()">Dergi Ekleme Basvurusu Yap</button>
	<button type="button" onclick="dergiYetkiAl()">Dergi Yetki Al</button>
	<button type="button" onclick="uyeIstekleriIncele()">Uye Istekleri</button>
	<button type="button" onclick="uyeSil()">Uye Sil</button>
	<button type="button" onclick="dergiSil()">Dergi Sil</button>
	<hr>
	
	<div id="profilDuzenleDiv"><h1>Profil Düzenle</h1></div>
	<s:form action="profilduzenle.action" method="post">
	    <s:textfield id="profilDuzenleAdTextField" name="ad" key="Ad" size="20" />
	    <s:textfield name="soyad" key="Soyad" size="20" />
	    <s:submit>(Sadece Struts ile Duzenliyor)</s:submit>
	</s:form>
	<button type="button" onclick="profilDuzenle()">JavaScript ile duzenle</button>
	<hr>
	
	<div id="yorumGonderDiv"><h1>Yorum Gonder</h1></div>
	<textarea rows="5" cols="30"></textarea>
	<button type="button" onclick="yorumGonder()">Yorum Gonder</button>
	<hr>
	
	<div id="hakemeMakaleGonderDiv"><h1>Hakeme Makale Gonder</h1></div>
	<select name="hakemSecimi"> 
	  <option value="Sedat" >Sedat </option>
	  <option value="Volkan" >Volkan</option>
	  <option value="Yilmaz" >Yılmaz</option>
	</select>
	Yada
	<textarea rows="1" cols="30">Email yaz</textarea>
	<button type="button" onclick="hakemeMakaleGonder()">Yorum Gonder</button>
	<hr>
	
	<div id="uyeKararDiv"><h1>Uyelik Karar Ver</h1></div>
	İsim: <textarea rows="1" cols="20" style=height:20px;margin-left:60px disabled>Sedat</textarea><br>
	Soyisim: <textarea rows="1" cols="20" style=height:20px;margin-left:37px disabled>Kurt</textarea><br>
	Doğum Tarihi: <textarea rows="1" cols="20" style=height:20px disabled>16/08/1990</textarea><br>
	Meslek: <textarea rows="1" cols="20" style=height:20px;margin-left:40px disabled>Mühendis</textarea><br>
	<button type="button" onclick="uyeKararVer(1)" style="margin-left:90px">Kabul Et</button>
	<button type="button" onclick="uyeKararVer(0)" style="margin-left:20px">Reddet</button>
	<hr>
	
	<div id="dergiKararDiv"><h1>Dergi Karar Ver</h1></div>
	Dergi: <textarea rows="1" cols="20" style=height:20px;margin-left:30px disabled>PCLabs</textarea><br>
	Konu: <textarea rows="1" cols="20" style=height:20px;margin-left:28px disabled>Bilgisayar Bilimleri</textarea><br>
	Editör: <textarea rows="1" cols="20" style=height:20px;margin-left:25px disabled>Sedat Kurt</textarea><br>
	<button type="button" onclick="dergiKararVer(1)" style="margin-left:90px">Kabul Et</button>
	<button type="button" onclick="dergiKararVer(0)" style="margin-left:20px">Reddet</button>
	<hr>
	
	<div id="gdiv"><h2>gokhan</h2></div>
	<button type="button" onclick="makaleDuzenle()">Makale Duzenle</button>
	<button type="button" onclick="yazardanDuzeltmeIste()">Yazardan Duzeltme Iste</button>
	<button type="button" onclick="rolSil()">Rol Sil</button>
	<div id="makaleKararVerdiv"><h1>Makale Karar Ver</h1></div>
	<button type="button" onclick="makaleKararVer(0)">Kabul</button>
	<button type="button" onclick="makaleKararVer(1)">Red</button>
	<button type="button" onclick="makaleKararVer(2)">Düzenle</button>
	
	<hr>
	<div id="yilmazDiv"><h1>YILMAZ</h1></div>
	<button type="button" onclick="rolBasvurusuYap()">Rol Başvurusu Yap</button>
	<button type="button" onclick="takipListesiGuncelle()">Takip Listesini Güncelle</button>
	<button type="button" onclick="makaleKararVerr()">Makale İçin Karar Ver</button>
	<button type="button" onclick="dergiOlustur()">Dergi Olustur</button>
	<hr>
	
</body>
</html>